<div class="content-primary">
	<nav>		
		<% if @room.stock %>
			<ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="e">
		<% else %>
			<ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="b">
		<% end %>
		<li data-role="list-divider">Computers in <%= @room.code %></li>
			<% if @computers.size > 0 %>
				<% @computers.each do |computer| %>
					<% if computer.operations.size == 0 %>
						<% if computer.status == 0 %>
			    			<li><%= link_to "<span style='color: #D33C3C'>#{computer.name}</span> (No operations)", :action => :showOperations, :id => computer.id%></li>
			    		<% end %>
						<% if computer.status == 1 %>
			    			<li><%= link_to "<span style='color: #56A00E'>#{computer.name}</span> (No operations)", :action => :showOperations, :id => computer.id%></li>
			    		<% end %>
						<% if computer.status == 2 %>
			    			<li><%= link_to "<span style='color: #E88430'>#{computer.name}</span> (No operations)", :action => :showOperations, :id => computer.id%></li>
			    		<% end %>
			    	<% elsif computer.operations.size > 1 %>
						<% if computer.status == 0 %>
				    		<li><%= link_to "<span style='color: #D33C3C'>#{computer.name}</span> (#{computer.operations.size} operations)", :action => :showOperations, :id => computer.id%></li>
						<% end %>
						<% if computer.status == 1 %>
				    		<li><%= link_to "<span style='color: #56A00E'>#{computer.name}</span> (#{computer.operations.size} operations)", :action => :showOperations, :id => computer.id%></li>
						<% end %>
						<% if computer.status == 2 %>
				    		<li><%= link_to "<span style='color: #E88430'>#{computer.name}</span> (#{computer.operations.size} operations)", :action => :showOperations, :id => computer.id%></li>
						<% end %>
			    	<% elsif computer.operations.size == 1 %>
						<% if computer.status == 0 %>
			    			<li><%= link_to "<span style='color: #D33C3C'>#{computer.name}</span> (#{computer.operations.size} operation)", :action => :showOperations, :id => computer.id%></li>
						<% end %>
						<% if computer.status == 1 %>
			    			<li><%= link_to "<span style='color: #56A00E'>#{computer.name}</span> (#{computer.operations.size} operation)", :action => :showOperations, :id => computer.id%></li>
						<% end %>
						<% if computer.status == 2 %>
			    			<li><%= link_to "<span style='color: #E88430'>#{computer.name}</span> (#{computer.operations.size} operation)", :action => :showOperations, :id => computer.id%></li>
						<% end %>
					<% end %>
				<% end %>
			<% else %>
				<li>No computers</li>
			<% end %>
		</ul>
	</nav>
</div>

